package com.loop;

public class forTest {
    public static void main(String[] args) {
        int sum1 = 0;
        for (int i = 0; i <= 5; i++){
            sum1 += i;
        }
        System.out.println(sum1);

        int sum = 0;
        for (int i = 1; i <= 10; i++){
            if (i % 2 == 1){
                sum += i;
            }
        }
        System.out.println(sum);

        int sum2 = 0;
        for (int i = 1; i <= 10; i += 2){
            sum2 += i;
        }
        System.out.println(sum2);
    }
}
